<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
checkadmin(1)
dim id,rsa1,sqla1,title,author,recordid,email,replytype,content,recontent,visible,fenlei, proc
id=GetIntQueryString("id")
Set rsa1 = Server.CreateObject("ADODB.Recordset")
sqla1 = "select * from [c_record_comment] where id="&id
rsa1.open sqla1,conn,1,1
title=rsa1("title")
author=rsa1("author")
recordid=rsa1("recordid")
email=rsa1("email")
content=rsa1("content")
visible=rsa1("visible")
fenlei=rsa1("fenlei")
rsa1.close
Set rsa1=Nothing
recontent=ReHTMLEncode(content)
Dim tablename,titlefield,path,LinkURL,titlevalue
Select Case fenlei
	Case 1:
		tablename="c_article"
		titlefield="title"
		proc=RZ_PRE_ARTICLE_SHOW
	Case 2:
		tablename="c_product"
		titlefield="productname"
		proc=RZ_PRE_PRODUCT_SHOW
	Case 3:
		tablename="c_photo"
		titlefield="photoname"
		proc=RZ_PRE_PHOTO_SHOW
End Select
dim sql2,rs2
sql2="select * from "&tablename&" where id="&recordid
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,conn,1,1
if not rs2.eof Then 
path=CutPath(rs2("path"))
LinkURL="../index.asp?"&proc&rs2("lang")&"-t"&path&"c"&rs2("id")&".html"
If rs2("specialid")>0 Then
	LinkURL="../index.asp?"&proc&rs2("lang")&"-t"&path&"s"&rs2("specialid")&"c"&rs2("id")&".html"
End If 
titlevalue=rs2(titlefield)
End If
rs2.close
set rs2=nothing
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑评论</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" language="JavaScript" src="admin_js/common.js"></script>
</head>
<body>
<br/>
<form method=post name="rzform" action="recordcomment_save.asp">
<input type="hidden" name="act" value="modifysave">
<input type="hidden" name="id" value="<%=id%>">
<table  cellspacing="0" cellpadding="0" class="table_800">
<tr>
	<th colspan="2">编辑评论</th>
</tr>
<tr  class="row">
	<td>评论对象</td>
	<td>&nbsp;<a href="<%=LinkURL%>" target="_blank" title="<%=titlevalue%>"><%=titlevalue%></a></td>
</tr>
<tr class="row">
	<td><font color="red">*</font>&nbsp;&nbsp;标题&nbsp;&nbsp;</td>
	<td><input type="text" id="title" name="title" value="<%=title%>" size="50" maxlength="100">&nbsp;&nbsp;（带<font color="red">*</font>为必填项目）</td>
</tr>
<tr class="row">
	<td>昵称&nbsp;&nbsp;</td>
	<td><input type="text" name="author" value="<%=author%>">（仅作内部联系，不对外公开）</td>
</tr>
<tr class="row">
	<td>Email&nbsp;&nbsp;</td>
	<td><input type="text" name="email" value="<%=email%>"></td>
</tr>
<tr class="row">
	<td><font color="red">*</font>&nbsp;&nbsp;评论内容&nbsp;&nbsp;</td>
	<td>
	<textarea name="content" id="content" rows="10" cols="80"><%=recontent%></textarea>
	</td>
</tr>
<tr  class="row">
	<td>审核状态</td>
	<td>&nbsp;
	<select name="visible" id="visible">
          <option value="0" <%if visible=0 Then response.write "selected=true"%>>未审核或不通过审核</option>
          <option value="1" <%if visible=1 Then response.write "selected=true"%>>审核通过</option>
    </select>
	</td>
</tr>
<tr class="row">
	<td colspan="2" class="tdcenter"><input type="button" class="btn" value="保存" onclick="checkForm('modifyrecordcomment');" >&nbsp;&nbsp;<input type="reset" class="btn" value="重置" >&nbsp;&nbsp;<input type="button" class="btn"  value="<%out("lang_back")%>" onclick="javascript:location.href='recordcomment_list.asp'"/></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>